Home | Trees | Index | Help |
---|
Package i2p :: Module samclasses :: Class Stream |
|
Method Summary | |
---|---|
__init__(self,
parent,
remotedest,
id,
didconnect)
| |
__del__(self)
| |
Current length of read buffer. | |
Close the stream. | |
on_close(self,
e)
| |
on_receive(self,
s)
| |
Reads up to n bytes in a manner identical to socket.recv. | |
Sends the string s, blocking if necessary. |
Method Details |
---|
__len__(self)
Current length of read buffer.
|
close(self)Close the stream. Threadsafe. |
recv(self, n, timeout=None, peek=False, waitall=False)Reads up to n bytes in a manner identical to socket.recv. Blocks for up to timeout seconds if n > 0 and no data is available (timeout=None means wait forever). If still no data is available, raises BlockError or Timeout. For a closed stream, recv will read the data stored in the buffer until EOF, at which point the read data will be truncated. If peek is True, the data is not removed. If waitall is True, reads exactly n bytes, or raises BlockError or Timeout as appropriate. Returns data. |
send(self, s)Sends the string s, blocking if necessary. |
Home | Trees | Index | Help |
---|
Generated by Epydoc 2.1 on Mon Aug 02 01:07:41 2004 | http://epydoc.sf.net |